package manager;

import java.util.List;

import model.Orderdetails;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import idao.IOrderdetailsDAO;
import imanager.IOrderdetailsManager;

@Service
public class OrderdetailsManager implements IOrderdetailsManager {

	@Autowired
	private IOrderdetailsDAO orderdetailsDAO;

	public IOrderdetailsDAO getOrderdetailsDAO() {
		return orderdetailsDAO;
	}

	public void setOrderdetailsDAO(IOrderdetailsDAO orderdetailsDAO) {
		this.orderdetailsDAO = orderdetailsDAO;
	}

	public OrderdetailsManager() {
		// TODO Auto-generated constructor stub
	}

	@Transactional
	public boolean insert(Orderdetails orderdetails) {
		// TODO Auto-generated method stub
		return orderdetailsDAO.insert(orderdetails);
	}

	@Transactional
	public boolean update(Orderdetails orderdetails) {
		// TODO Auto-generated method stub
		return orderdetailsDAO.update(orderdetails);
	}

	@Transactional
	public boolean delete(Orderdetails orderdetails) {
		// TODO Auto-generated method stub
		return orderdetailsDAO.delete(orderdetails);
	}

	@Transactional
	public Orderdetails getOrdertailByID(int id) {
		// TODO Auto-generated method stub
		return orderdetailsDAO.getOrdertailByID(id);
	}

	@Transactional
	public List<Orderdetails> getAll() {
		// TODO Auto-generated method stub
		return orderdetailsDAO.getAll();
	}

}
